- content_for :title do
  = t('.title')

- content_for :section_title do
  = t('.title')

- content_for :section_rightpanel do
  a.btn.btn-icon.btn-success href="#{new_admin_user_path}"
    i.icon.far.fa-plus-square
    = t('.new_user')

.row
  .col-md-12
    .card
      .card-body.p-0
        table.table
          thead
            tr
              th = t('.number')
              th = t('.nickname')
              th = t('.email')
              th = t('.role')
              th = t('.status')
              th = t('.last_login_time')
              th = t('.action')
          tbody
            - @users.each_with_index do |user, i|
              tr
                td
                  = i + 1
                td
                  = link_to user.username, edit_admin_user_path(user)
                td
                  = user.email
                td
                  = user.role_name
                td
                  - if user.confirmed_at
                    = t('.active')
                  - else
                    = link_to t('.inactive'), edit_admin_user_path(user)
                td
                  - if user.last_sign_in_at
                    = time_ago_in_words(user.last_sign_in_at)
                  - else
                    = t('.never_logged_in')
                td
                  = link_to t('.destroy_user'), admin_user_path(user), \
                    data: { turbo_method: :delete, turbo_confirm: t('.destroy_user_confirm', user: user.username) }
